<template>
  <div class="appgoodaction">
      <!-- 购物车底部组件 -->
      <van-goods-action>
            <van-goods-action-icon  @click="changShow"
            :icon="isShowmode?'star':'star-o'" 
            :text="isShowmode?'已收藏':'未收藏'" 
            :color="isShowmode?'#ff5000':'#333'" 
            />
            <van-goods-action-icon icon="cart-o" text="购物车" :badge="goodsCount"/>
            <van-goods-action-button type="warning" text="加入购物车" @click="gotoCart"/>
            <van-goods-action-button type="danger" text="立即购买" @click="handlbug"/>
      </van-goods-action>
  </div>
</template>

<script>
export default {
    props:["goodsCount"],
    data(){
        return{
            isShowmode:false
        }
    },
    methods:{
        changShow(){
            this.isShowmode = !this.isShowmode
        },
        handlbug(){
            this.$toast.fail('暂未开放');
        },
        gotoCart(){
            this.$emit('gotoCart')
        }
    }
}
</script>

<style lang="scss" scoped>
   .van-goods-action{
    z-index: 99999;
}  
</style>